FROM python:3.7

#配置时区
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# 设置标签
LABEL type=app

# 设置环境变量
ARG PROJECT_NAME
ENV PROJECT_NAME=$PROJECT_NAME

# 拷贝代码到docker中
ADD ./app.tar.gz /opt
# entrypoint.sh为启动文件
COPY ./entrypoint.sh /entrypoint.sh
# 拷贝初始化脚本script.sh
COPY ./script.sh /script.sh

RUN /bin/bash /script.sh

ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
